package com.bobi.ecofavor.mapper;

import com.bobi.ecofavor.model.domain.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 商品 Mapper 接口
 * </p>
 *
 * @author wenyuan
 * @since 2023-10-21
 */
@Repository
public interface GoodsMapper extends BaseMapper<Goods> {

    List<Goods> selectByStoreId(Integer storeId);

    void recoverStock(@Param("orderId") Integer orderId, @Param("goodsNum") Integer goodsNum);

    Goods selectGAndSByGoodsId(Integer id);

    double selectPriceByGoodsId(Integer id);
}
